package com.adcc.swingui.demo.menubar.type;

import java.awt.Container;
import java.util.List;

import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JMenu;
import javax.swing.JMenuItem;

import com.adcc.swingui.base.DefaultMenuBar;
import com.jidesoft.swing.JideMenu;
/**
 * 普通菜单   分线程调用和非线程调用
 * @author charlie
 *
 */
public class MenuBut1 extends DefaultMenuBar {

	public MenuBut1(Container container) {
		super(container);
	}

	@Override
	protected JComponent build() {
		JMenuItem item;
		JMenu menu = new JideMenu("文件");
		menu.setMnemonic('F');

		// 打开文件
		item = new JMenuItem("打开文件", new ImageIcon("res/images/open_file.png"));
		//线程调用
		addChildMenu(menu, item, "action", true);
		return menu;
	}
	/**
	 * 操作，被反射调用
	 */
	public void action() {
		
	}

	@Override
	protected void offLineVisiable(List<JComponent> jcomps) {
		// TODO Auto-generated method stub
		
	}

}
